package cn.qzuie.smart.module.dorm.controller.admin.energyusage.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 能源使用新增/修改 Request VO")
@Data
public class EnergyUsageSaveReqVO {

    @Schema(description = "用电记录ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11591")
    private Long id;

    @Schema(description = "宿舍ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7928")
    @NotNull(message = "宿舍ID不能为空")
    private Long dormitoryId;

    @Schema(description = "能源编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "8326")
    @NotNull(message = "能源编号不能为空")
    private Long energyId;

    @Schema(description = "上次抄表日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "上次抄表日期不能为空")
    private LocalDateTime preReadingDate;

    @Schema(description = "当前读数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "当前读数不能为空")
    private Double currentReading;

    @Schema(description = "上次读数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "上次读数不能为空")
    private BigDecimal previousReading;

    @Schema(description = "抄表人", example = "19279")
    private Long userId;

    @Schema(description = "用量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "用量不能为空")
    private String usage;

}